package com.px.mapper;

import com.px.pojo.ShComment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShCommentMapper {

    //获取评论列表
    List<ShComment> selectShCommentList(@Param("commentType") Integer commentType,
                                        @Param("commodityId") Integer commodityId,
                                        @Param("userId") Integer userId,
                                        @Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize)throws Exception;

    //获取评论记录数
    int selectShCommentCount(@Param("commentType") Integer commentType,
                               @Param("commodityId") Integer commodityId,
                               @Param("userId") Integer userId)throws Exception;

    //获取评论信息
    ShComment selectShComment(@Param("commentId") Integer commentId)throws Exception;

    //添加评论信息
    int insertShComment(ShComment shComment)throws Exception;

    //更新评论信息
    int updateShComment(ShComment shComment)throws Exception;

    //删除评论信息
    int deleteShComment(@Param("commentId")Integer id)throws Exception;
}
